﻿using System;

namespace KC.Overhead.Constants
{
	public static class RegExes
	{
		/// <summary>Used to validate Internet-scoped URLs (no hostnames)</summary>
		public const string UrlRegex_InternetScope =
			@"^((https?|ftp)\:(\/){2}|(file\:\/{2,3}))?" +
			@"(((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|" +
			@"(((([a-zA-Z0-9]+)(\.)?)+?)(\.)([a-z]{2}|com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum))" +
			@"([\/][\/a-zA-Z0-9\.]*)*?([\/]?(([\?][a-zA-Z0-9]+[\=][a-zA-Z0-9\%\(\)]*)([\&][a-zA-Z0-9]+[\=][a-zA-Z0-9\%\(\)]*)*?))?$";
		public const string UrlRegex_Image = @"(http\://.*)(A-Za-z0-9-_\.)*?(\.)(jpg|gif|bmp|png|tiff?)";
		public const string HtmlRegex_Hyperlink = @"(<a.*?>.*?</a>)";
		public const string HtmlRegex_HyperlinkInner = @"href=\""(.*?)\""";


		// TODO: Finish Email address regex - see http://www.ietf.org/rfc/rfc822
		public const string EmailRegex =
			@"^([A-Za-z0-9\.-_)([@])(([A-Za-z0-9-_]*)(\.*))*$"
			;
	}
}
